home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / circusc.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  16KB  |  434 lines

  1. /***************************************************************************
  2.  
  3. Based on drivers from Juno First emulator by Chris Hardy (chrish@kcbbs.gen.nz)
  4.  
  5. ***************************************************************************/
  6.  
  7. #include "driver.h"
  8. #include "vidhrdw/generic.h"
  9. #include "cpu/m6809/m6809.h"
  10.  
  11.  
  12. void konami1_decode(void);
  13.  
  14. extern unsigned char *circusc_spritebank;
  15. extern unsigned char *circusc_scroll;
  16.  
  17. WRITE_HANDLER( circusc_flipscreen_w );
  18. void circusc_vh_convert_color_prom(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  19. WRITE_HANDLER( circusc_sprite_bank_select_w );
  20. void circusc_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  21.  
  22.  
  23.  
  24. READ_HANDLER( circusc_sh_timer_r )
  25. {
  26.     int clock;
  27. #define CIRCUSCHALIE_TIMER_RATE (14318180/6144)
  28.  
  29.     clock = (cpu_gettotalcycles()*4) / CIRCUSCHALIE_TIMER_RATE;
  30.  
  31.     return clock & 0xF;
  32. }
  33.  
  34. WRITE_HANDLER( circusc_sh_irqtrigger_w )
  35. {
  36.     cpu_cause_interrupt(1,0xff);
  37. }
  38.  
  39. WRITE_HANDLER( circusc_dac_w )
  40. {
  41.     DAC_data_w(0,data);
  42. }
  43.  
  44.  
  45.  
  46. static struct MemoryReadAddress readmem[] =
  47. {
  48.     { 0x1000, 0x1000, input_port_0_r }, /* IO Coin */
  49.     { 0x1001, 0x1001, input_port_1_r }, /* P1 IO */
  50.     { 0x1002, 0x1002, input_port_2_r }, /* P2 IO */
  51.     { 0x1400, 0x1400, input_port_3_r }, /* DIP 1 */
  52.     { 0x1800, 0x1800, input_port_4_r }, /* DIP 2 */
  53.     { 0x2000, 0x39ff, MRA_RAM },
  54.     { 0x6000, 0xffff, MRA_ROM },
  55.     { -1 }  /* end of table */
  56. };
  57.  
  58. static struct MemoryWriteAddress writemem[] =
  59. {
  60.     { 0x0000, 0x0000, circusc_flipscreen_w },
  61.     { 0x0001, 0x0001, interrupt_enable_w },
  62.     { 0x0003, 0x0004, coin_counter_w },  /* Coin counters */
  63.     { 0x0005, 0x0005, MWA_RAM, &circusc_spritebank },
  64.     { 0x0400, 0x0400, watchdog_reset_w },
  65.     { 0x0800, 0x0800, soundlatch_w },
  66.     { 0x0c00, 0x0c00, circusc_sh_irqtrigger_w },  /* cause interrupt on audio CPU */
  67.     { 0x1c00, 0x1c00, MWA_RAM, &circusc_scroll },
  68.     { 0x2000, 0x2fff, MWA_RAM },
  69.     { 0x3000, 0x33ff, colorram_w, &colorram },
  70.     { 0x3400, 0x37ff, videoram_w, &videoram, &videoram_size },
  71.     { 0x3800, 0x38ff, MWA_RAM, &spriteram_2 },
  72.     { 0x3900, 0x39ff, MWA_RAM, &spriteram, &spriteram_size },
  73.     { 0x3a00, 0x3fff, MWA_RAM },
  74.     { 0x6000, 0xffff, MWA_ROM },
  75.     { -1 }  /* end of table */
  76. };
  77.  
  78. static struct MemoryReadAddress sound_readmem[] =
  79. {
  80.     { 0x0000, 0x3fff, MRA_ROM },
  81.     { 0x4000, 0x43ff, MRA_RAM },
  82.     { 0x6000, 0x6000, soundlatch_r },
  83.     { 0x8000, 0x8000, circusc_sh_timer_r },
  84.     { -1 }  /* end of table */
  85. };
  86.  
  87. static struct MemoryWriteAddress sound_writemem[] =
  88. {
  89.     { 0x0000, 0x3fff, MWA_ROM },
  90.     { 0x4000, 0x43ff, MWA_RAM },
  91.     { 0xa000, 0xa000, MWA_NOP },    /* latch command for the 76496. We should buffer this */
  92.                                     /* command and send it to the chip, but we just use */
  93.                                     /* the triggers below because the program always writes */
  94.                                     /* the same number here and there. */
  95.     { 0xa001, 0xa001, SN76496_0_w },        /* trigger the 76496 to read the latch */
  96.     { 0xa002, 0xa002, SN76496_1_w },        /* trigger the 76496 to read the latch */
  97.     { 0xa003, 0xa003, circusc_dac_w },
  98.     { 0xa004, 0xa004, MWA_NOP },            /* ??? */
  99.     { 0xa07c, 0xa07c, MWA_NOP },            /* ??? */
  100.     { -1 }  /* end of table */
  101. };
  102.  
  103.  
  104.  
  105. INPUT_PORTS_START( circusc )
  106.     PORT_START      /* IN0 */
  107.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
  108.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_COIN2 )
  109.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
  110.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
  111.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
  112.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  113.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  114.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  115.  
  116.     PORT_START      /* IN1 */
  117.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_2WAY )
  118.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_2WAY )
  119.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  120.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  121.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  122.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  123.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  124.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  125.  
  126.     PORT_START      /* IN2 */
  127.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT  | IPF_2WAY | IPF_COCKTAIL )
  128.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT | IPF_2WAY | IPF_COCKTAIL )
  129.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
  130.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
  131.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 | IPF_COCKTAIL )
  132.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
  133.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
  134.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
  135.     PORT_START      /* DSW0 */
  136.  
  137.     PORT_DIPNAME( 0x0f, 0x0f, DEF_STR( Coin_A ) )
  138.     PORT_DIPSETTING(    0x02, DEF_STR( 4C_1C ) )
  139.     PORT_DIPSETTING(    0x05, DEF_STR( 3C_1C ) )
  140.     PORT_DIPSETTING(    0x08, DEF_STR( 2C_1C ) )
  141.     PORT_DIPSETTING(    0x04, DEF_STR( 3C_2C ) )
  142.     PORT_DIPSETTING(    0x01, DEF_STR( 4C_3C ) )
  143.     PORT_DIPSETTING(    0x0f, DEF_STR( 1C_1C ) )
  144.     PORT_DIPSETTING(    0x03, DEF_STR( 3C_4C ) )
  145.     PORT_DIPSETTING(    0x07, DEF_STR( 2C_3C ) )
  146.     PORT_DIPSETTING(    0x0e, DEF_STR( 1C_2C ) )
  147.     PORT_DIPSETTING(    0x06, DEF_STR( 2C_5C ) )
  148.     PORT_DIPSETTING(    0x0d, DEF_STR( 1C_3C ) )
  149.     PORT_DIPSETTING(    0x0c, DEF_STR( 1C_4C ) )
  150.     PORT_DIPSETTING(    0x0b, DEF_STR( 1C_5C ) )
  151.     PORT_DIPSETTING(    0x0a, DEF_STR( 1C_6C ) )
  152.     PORT_DIPSETTING(    0x09, DEF_STR( 1C_7C ) )
  153.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  154.     PORT_DIPNAME( 0xf0, 0xf0, DEF_STR( Coin_B ) )
  155.     PORT_DIPSETTING(    0x20, DEF_STR( 4C_1C ) )
  156.     PORT_DIPSETTING(    0x50, DEF_STR( 3C_1C ) )
  157.     PORT_DIPSETTING(    0x80, DEF_STR( 2C_1C ) )
  158.     PORT_DIPSETTING(    0x40, DEF_STR( 3C_2C ) )
  159.     PORT_DIPSETTING(    0x10, DEF_STR( 4C_3C ) )
  160.     PORT_DIPSETTING(    0xf0, DEF_STR( 1C_1C ) )
  161.     PORT_DIPSETTING(    0x30, DEF_STR( 3C_4C ) )
  162.     PORT_DIPSETTING(    0x70, DEF_STR( 2C_3C ) )
  163.     PORT_DIPSETTING(    0xe0, DEF_STR( 1C_2C ) )
  164.     PORT_DIPSETTING(    0x60, DEF_STR( 2C_5C ) )
  165.     PORT_DIPSETTING(    0xd0, DEF_STR( 1C_3C ) )
  166.     PORT_DIPSETTING(    0xc0, DEF_STR( 1C_4C ) )
  167.     PORT_DIPSETTING(    0xb0, DEF_STR( 1C_5C ) )
  168.     PORT_DIPSETTING(    0xa0, DEF_STR( 1C_6C ) )
  169.     PORT_DIPSETTING(    0x90, DEF_STR( 1C_7C ) )
  170.     PORT_DIPSETTING(    0x00, DEF_STR( Free_Play ) )
  171.  
  172.     PORT_START      /* DSW1 */
  173.     PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) )
  174.     PORT_DIPSETTING(    0x03, "3" )
  175.     PORT_DIPSETTING(    0x02, "4" )
  176.     PORT_DIPSETTING(    0x01, "5" )
  177.     PORT_DIPSETTING(    0x00, "7" )
  178.     PORT_DIPNAME( 0x04, 0x00, DEF_STR( Cabinet ) )
  179.     PORT_DIPSETTING(    0x00, DEF_STR( Upright ) )
  180.     PORT_DIPSETTING(    0x04, DEF_STR( Cocktail ) )
  181.     PORT_DIPNAME( 0x08, 0x08, DEF_STR( Bonus_Life ) )
  182.     PORT_DIPSETTING(    0x08, "20000 70000" )
  183.     PORT_DIPSETTING(    0x00, "30000 80000" )
  184.     PORT_DIPNAME( 0x10, 0x10, "Dip Sw2 5" )
  185.     PORT_DIPSETTING(    0x10, DEF_STR( Off ) )
  186.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  187.     PORT_DIPNAME( 0x20, 0x20, "Dip Sw2 6" )
  188.     PORT_DIPSETTING(    0x20, DEF_STR( Off ) )
  189.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  190.     PORT_DIPNAME( 0x40, 0x40, "Dip Sw2 7" )
  191.     PORT_DIPSETTING(    0x40, DEF_STR( Off ) )
  192.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  193.     PORT_DIPNAME( 0x80, 0x00, DEF_STR( Demo_Sounds ) )
  194.     PORT_DIPSETTING(    0x80, DEF_STR( Off ) )
  195.     PORT_DIPSETTING(    0x00, DEF_STR( On ) )
  196. INPUT_PORTS_END
  197.  
  198.  
  199.  
  200. static struct GfxLayout charlayout =
  201. {
  202.     8,8,    /* 8*8 characters */
  203.     512,    /* 512 characters */
  204.     4,      /* 4 bits per pixel */
  205.     { 0, 1, 2, 3 }, /* the four bitplanes are packed in one nibble */
  206.     { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 },
  207.     { 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
  208.     32*8    /* every char takes 8 consecutive bytes */
  209. };
  210.  
  211. static struct GfxLayout spritelayout =
  212. {
  213.     16,16,  /* 16*16 sprites */
  214.     384,    /* 384 sprites */
  215.     4,      /* 4 bits per pixel */
  216.     { 0, 1, 2, 3 },        /* the bitplanes are packed */
  217.     { 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4,
  218.             8*4, 9*4, 10*4, 11*4, 12*4, 13*4, 14*4, 15*4 },
  219.     { 0*4*16, 1*4*16, 2*4*16, 3*4*16, 4*4*16, 5*4*16, 6*4*16, 7*4*16,
  220.             8*4*16, 9*4*16, 10*4*16, 11*4*16, 12*4*16, 13*4*16, 14*4*16, 15*4*16 },
  221.     32*4*8    /* every sprite takes 128 consecutive bytes */
  222. };
  223.  
  224. static struct GfxDecodeInfo gfxdecodeinfo[] =
  225. {
  226.     { REGION_GFX1, 0, &charlayout,       0, 16 },
  227.     { REGION_GFX2, 0, &spritelayout, 16*16, 16 },
  228.     { -1 } /* end of array */
  229. };
  230.  
  231.  
  232.  
  233. static struct SN76496interface sn76496_interface =
  234. {
  235.     2,      /* 2 chips */
  236.     { 14318180/8, 14318180/8 },     /*  1.7897725 Mhz */
  237.     { 100, 100 }
  238. };
  239.  
  240. static struct DACinterface dac_interface =
  241. {
  242.     1,
  243.     { 100 }
  244. };
  245.  
  246.  
  247.  
  248. static struct MachineDriver machine_driver_circusc =
  249. {
  250.     /* basic machine hardware */
  251.     {
  252.         {
  253.             CPU_M6809,
  254.             2048000,        /* 2 Mhz */
  255.             readmem,writemem,0,0,
  256.             interrupt,1
  257.         },
  258.         {
  259.             CPU_Z80 | CPU_AUDIO_CPU,
  260.             14318180/4,     /* Z80 Clock is derived from a 14.31818 Mhz crystal */
  261.             sound_readmem,sound_writemem,0,0,
  262.             ignore_interrupt,1      /* interrupts are triggered by the main CPU */
  263.         }
  264.     },
  265.     60, DEFAULT_60HZ_VBLANK_DURATION,       /* frames per second, vblank duration */
  266.     1,      /* 1 CPU slice per frame - interleaving is forced when a sound command is written */
  267.     0,
  268.  
  269.     /* video hardware */
  270.     32*8, 32*8, { 0*8, 32*8-1, 2*8, 30*8-1 },
  271.     gfxdecodeinfo,
  272.     32,16*16+16*16,
  273.     circusc_vh_convert_color_prom,
  274.  
  275.     VIDEO_TYPE_RASTER,
  276.     0,
  277.     generic_vh_start,
  278.     generic_vh_stop,
  279.     circusc_vh_screenrefresh,
  280.  
  281.     /* sound hardware */
  282.     0,0,0,0,
  283.     {
  284.         {
  285.             SOUND_SN76496,
  286.             &sn76496_interface
  287.         },
  288.         {
  289.             SOUND_DAC,
  290.             &dac_interface
  291.         }
  292.     }
  293. };
  294.  
  295.  
  296.  
  297. /***************************************************************************
  298.  
  299.   Game driver(s)
  300.  
  301. ***************************************************************************/
  302.  
  303. ROM_START( circusc )
  304.     ROM_REGION( 2*0x10000, REGION_CPU1 )     /* 64k for code + 64k for decrypted opcodes */
  305.     ROM_LOAD( "s05",          0x6000, 0x2000, 0x48feafcf )
  306.     ROM_LOAD( "q04",          0x8000, 0x2000, 0xc283b887 )
  307.     ROM_LOAD( "q03",          0xa000, 0x2000, 0xe90c0e86 )
  308.     ROM_LOAD( "q02",          0xc000, 0x2000, 0x4d847dc6 )
  309.     ROM_LOAD( "q01",          0xe000, 0x2000, 0x18c20adf )
  310.  
  311.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the audio CPU */
  312.     ROM_LOAD( "cd05_l14.bin", 0x0000, 0x2000, 0x607df0fb )
  313.     ROM_LOAD( "cd07_l15.bin", 0x2000, 0x2000, 0xa6ad30e1 )
  314.  
  315.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  316.     ROM_LOAD( "a04_j12.bin",  0x0000, 0x2000, 0x56e5b408 )
  317.     ROM_LOAD( "a05_k13.bin",  0x2000, 0x2000, 0x5aca0193 )
  318.  
  319.     ROM_REGION( 0x0c000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  320.     ROM_LOAD( "e11_j06.bin",  0x0000, 0x2000, 0xdf0405c6 )
  321.     ROM_LOAD( "e12_j07.bin",  0x2000, 0x2000, 0x23dfe3a6 )
  322.     ROM_LOAD( "e13_j08.bin",  0x4000, 0x2000, 0x3ba95390 )
  323.     ROM_LOAD( "e14_j09.bin",  0x6000, 0x2000, 0xa9fba85a )
  324.     ROM_LOAD( "e15_j10.bin",  0x8000, 0x2000, 0x0532347e )
  325.     ROM_LOAD( "e16_j11.bin",  0xa000, 0x2000, 0xe1725d24 )
  326.  
  327.     ROM_REGION( 0x0220, REGION_PROMS )
  328.     ROM_LOAD( "a02_j18.bin",  0x0000, 0x020, 0x10dd4eaa ) /* palette */
  329.     ROM_LOAD( "c10_j16.bin",  0x0020, 0x100, 0xc244f2aa ) /* character lookup table */
  330.     ROM_LOAD( "b07_j17.bin",  0x0120, 0x100, 0x13989357 ) /* sprite lookup table */
  331. ROM_END
  332.  
  333. ROM_START( circusc2 )
  334.     ROM_REGION( 2*0x10000, REGION_CPU1 )     /* 64k for code + 64k for decrypted opcodes */
  335.     ROM_LOAD( "h03_r05.bin",  0x6000, 0x2000, 0xed52c60f )
  336.     ROM_LOAD( "h04_n04.bin",  0x8000, 0x2000, 0xfcc99e33 )
  337.     ROM_LOAD( "h05_n03.bin",  0xa000, 0x2000, 0x5ef5b3b5 )
  338.     ROM_LOAD( "h06_n02.bin",  0xc000, 0x2000, 0xa5a5e796 )
  339.     ROM_LOAD( "h07_n01.bin",  0xe000, 0x2000, 0x70d26721 )
  340.  
  341.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the audio CPU */
  342.     ROM_LOAD( "cd05_l14.bin", 0x0000, 0x2000, 0x607df0fb )
  343.     ROM_LOAD( "cd07_l15.bin", 0x2000, 0x2000, 0xa6ad30e1 )
  344.  
  345.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  346.     ROM_LOAD( "a04_j12.bin",  0x0000, 0x2000, 0x56e5b408 )
  347.     ROM_LOAD( "a05_k13.bin",  0x2000, 0x2000, 0x5aca0193 )
  348.  
  349.     ROM_REGION( 0x0c000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  350.     ROM_LOAD( "e11_j06.bin",  0x0000, 0x2000, 0xdf0405c6 )
  351.     ROM_LOAD( "e12_j07.bin",  0x2000, 0x2000, 0x23dfe3a6 )
  352.     ROM_LOAD( "e13_j08.bin",  0x4000, 0x2000, 0x3ba95390 )
  353.     ROM_LOAD( "e14_j09.bin",  0x6000, 0x2000, 0xa9fba85a )
  354.     ROM_LOAD( "e15_j10.bin",  0x8000, 0x2000, 0x0532347e )
  355.     ROM_LOAD( "e16_j11.bin",  0xa000, 0x2000, 0xe1725d24 )
  356.  
  357.     ROM_REGION( 0x0220, REGION_PROMS )
  358.     ROM_LOAD( "a02_j18.bin",  0x0000, 0x020, 0x10dd4eaa ) /* palette */
  359.     ROM_LOAD( "c10_j16.bin",  0x0020, 0x100, 0xc244f2aa ) /* character lookup table */
  360.     ROM_LOAD( "b07_j17.bin",  0x0120, 0x100, 0x13989357 ) /* sprite lookup table */
  361. ROM_END
  362.  
  363. ROM_START( circuscc )
  364.     ROM_REGION( 2*0x10000, REGION_CPU1 )     /* 64k for code + 64k for decrypted opcodes */
  365.     ROM_LOAD( "cc_u05.h3",    0x6000, 0x2000, 0x964c035a )
  366.     ROM_LOAD( "p04",          0x8000, 0x2000, 0xdd0c0ee7 )
  367.     ROM_LOAD( "p03",          0xa000, 0x2000, 0x190247af )
  368.     ROM_LOAD( "p02",          0xc000, 0x2000, 0x7e63725e )
  369.     ROM_LOAD( "p01",          0xe000, 0x2000, 0xeedaa5b2 )
  370.  
  371.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the audio CPU */
  372.     ROM_LOAD( "cd05_l14.bin", 0x0000, 0x2000, 0x607df0fb )
  373.     ROM_LOAD( "cd07_l15.bin", 0x2000, 0x2000, 0xa6ad30e1 )
  374.  
  375.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  376.     ROM_LOAD( "a04_j12.bin",  0x0000, 0x2000, 0x56e5b408 )
  377.     ROM_LOAD( "a05_k13.bin",  0x2000, 0x2000, 0x5aca0193 )
  378.  
  379.     ROM_REGION( 0x0c000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  380.     ROM_LOAD( "e11_j06.bin",  0x0000, 0x2000, 0xdf0405c6 )
  381.     ROM_LOAD( "e12_j07.bin",  0x2000, 0x2000, 0x23dfe3a6 )
  382.     ROM_LOAD( "e13_j08.bin",  0x4000, 0x2000, 0x3ba95390 )
  383.     ROM_LOAD( "e14_j09.bin",  0x6000, 0x2000, 0xa9fba85a )
  384.     ROM_LOAD( "e15_j10.bin",  0x8000, 0x2000, 0x0532347e )
  385.     ROM_LOAD( "e16_j11.bin",  0xa000, 0x2000, 0xe1725d24 )
  386.  
  387.     ROM_REGION( 0x0220, REGION_PROMS )
  388.     ROM_LOAD( "a02_j18.bin",  0x0000, 0x020, 0x10dd4eaa ) /* palette */
  389.     ROM_LOAD( "c10_j16.bin",  0x0020, 0x100, 0xc244f2aa ) /* character lookup table */
  390.     ROM_LOAD( "b07_j17.bin",  0x0120, 0x100, 0x13989357 ) /* sprite lookup table */
  391. ROM_END
  392.  
  393. ROM_START( circusce )
  394.     ROM_REGION( 2*0x10000, REGION_CPU1 )     /* 64k for code + 64k for decrypted opcodes */
  395.     ROM_LOAD( "p05",          0x6000, 0x2000, 0x7ca74494 )
  396.     ROM_LOAD( "p04",          0x8000, 0x2000, 0xdd0c0ee7 )
  397.     ROM_LOAD( "p03",          0xa000, 0x2000, 0x190247af )
  398.     ROM_LOAD( "p02",          0xc000, 0x2000, 0x7e63725e )
  399.     ROM_LOAD( "p01",          0xe000, 0x2000, 0xeedaa5b2 )
  400.  
  401.     ROM_REGION( 0x10000, REGION_CPU2 )     /* 64k for the audio CPU */
  402.     ROM_LOAD( "cd05_l14.bin", 0x0000, 0x2000, 0x607df0fb )
  403.     ROM_LOAD( "cd07_l15.bin", 0x2000, 0x2000, 0xa6ad30e1 )
  404.  
  405.     ROM_REGION( 0x04000, REGION_GFX1 | REGIONFLAG_DISPOSE )
  406.     ROM_LOAD( "a04_j12.bin",  0x0000, 0x2000, 0x56e5b408 )
  407.     ROM_LOAD( "a05_k13.bin",  0x2000, 0x2000, 0x5aca0193 )
  408.  
  409.     ROM_REGION( 0x0c000, REGION_GFX2 | REGIONFLAG_DISPOSE )
  410.     ROM_LOAD( "e11_j06.bin",  0x0000, 0x2000, 0xdf0405c6 )
  411.     ROM_LOAD( "e12_j07.bin",  0x2000, 0x2000, 0x23dfe3a6 )
  412.     ROM_LOAD( "e13_j08.bin",  0x4000, 0x2000, 0x3ba95390 )
  413.     ROM_LOAD( "e14_j09.bin",  0x6000, 0x2000, 0xa9fba85a )
  414.     ROM_LOAD( "e15_j10.bin",  0x8000, 0x2000, 0x0532347e )
  415.     ROM_LOAD( "e16_j11.bin",  0xa000, 0x2000, 0xe1725d24 )
  416.  
  417.     ROM_REGION( 0x0220, REGION_PROMS )
  418.     ROM_LOAD( "a02_j18.bin",  0x0000, 0x020, 0x10dd4eaa ) /* palette */
  419.     ROM_LOAD( "c10_j16.bin",  0x0020, 0x100, 0xc244f2aa ) /* character lookup table */
  420.     ROM_LOAD( "b07_j17.bin",  0x0120, 0x100, 0x13989357 ) /* sprite lookup table */
  421. ROM_END
  422.  
  423.  
  424. static void init_circusc(void)
  425. {
  426.     konami1_decode();
  427. }
  428.  
  429.  
  430. GAME( 1984, circusc,  0,       circusc, circusc, circusc, ROT90, "Konami", "Circus Charlie" )
  431. GAME( 1984, circusc2, circusc, circusc, circusc, circusc, ROT90, "Konami", "Circus Charlie (no level select)" )
  432. GAME( 1984, circuscc, circusc, circusc, circusc, circusc, ROT90, "Konami (Centuri licence)", "Circus Charlie (Centuri)" )
  433. GAME( 1984, circusce, circusc, circusc, circusc, circusc, ROT90, "Konami (Centuri licence)", "Circus Charlie (Centuri, earlier)" )
  434.